<!doctype html>
<html lang="zh-CN">
<head>
    <!-- 必须的 meta 标签 -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap 的 CSS 文件 -->
    <link rel="stylesheet" href="/static/bootstrap/bootstrap.min.css">
    <script src="/static/bootstrap/jquery.slim.min.js"></script>
    <script src="/static/bootstrap/bootstrap.bundle.min.js"></script>

    <title>Hello, world!</title>
</head>
<body>

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <a class="navbar-brand" href="/">成绩管理</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
                <a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="/submit_grade">成绩录入</a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="/show_grade">成绩展示</a>
            </li>

        </ul>
        {% if "user_name" not in session %}
        <a class="nav-link" href="/login">登录</a>
        {% else %}
        <a class="nav-link" href="/logout">退出</a>
        {% endif %}
    </div>
</nav>